package com.zb.vo;

import com.zb.annotation.NumberPattern;
import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Author WEN
 * @Date 2024/5/25 0025
 **/
@Data
@ApiModel("更改工单提现手续费对象")
public class OrderWithdrawHandlingFeeVo {
    @NotNull(message = "服务商不能为空，至少选择一项")
    @Size(min = 1, message = "服务商不能为空，至少选择一项")
    @ApiModelProperty(value = "服务商ID", required = true)
    private List<Long> networkIds;

    @NotNull(message = "提现手续费策略不能为空")
    @NumberPattern(regexp = "^(1|2)$", required = true, message = "")
    @ApiModelProperty(value = "提现手续费策略：1-按比例收取(按提现总金额计算)，2-每间固定(按每单总金额计算)", required = true, example = "1")
    private Integer withdrawHandlingFeeStrategy;

    @NotNull(message = "手续费比例不能为空")
    @NumberPattern(regexp = VerificUtil.FLOATING_NUMBER_10_2, required = true ,message = "手续费比例最多允许输入8位整数，两位小数")
    @ApiModelProperty(value = "手续费比例，单位为%，当withdrawHandlingFeeStrategy=1时生效", required = true, example = "0")
    private BigDecimal handingFeeProportion;

    @NotNull(message = "每单固定手续费不能为空")
    @NumberPattern(regexp = VerificUtil.FLOATING_NUMBER_10_2, required = true ,message = "每单固定手续费最多允许输入8位整数，两位小数")
    @ApiModelProperty(value = "每单固定手续费：当withdrawHandlingFeeStrategy=2时生效", required = true, example = "0")
    private BigDecimal handingFeeFixedOrder;
}
